package com.example.demo.controller;


import com.example.demo.pojo.DemoBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@RestController
@RequestMapping(value = "/demo")
public class DemoController {

    @GetMapping("")
    public DemoBean hello(){
        /**
         * 请求该接口，对返回值进行了处理，返回如下数据：
         * {
         * 	"id":1,
         * 	"name":"你好",
         * 	"ti":"2021年07月02日 15:12:02",
         * 	"type":"groupKey是:type1,属性值是:1001，备注是:噼里啪啦彭"
         * }
         */
        return new DemoBean(1,1001,"你好",  LocalDateTime.now());
    }
}
